package com.controller.utils;


import lombok.Data;

@Data
public class R {
    private Boolean flag;
    private Object data;

    private String message;

    public R(){

    }
    public R(Boolean flag){
        this.flag=flag;
    }

    public R(Boolean flag,Object data){
        this.flag=flag;
        this.data=data;
    }

    public R(Boolean flag,String msg){
        this.flag=flag;
        this.message=msg;
    }

    public R(String msg){
        this.flag=false;
        this.message=msg;
    }

}

/*
设计表现层返回结果的模型类，用于后端和前端进行数据格式统一，也称为前后端数据协议.
便于前端开发读取数据。
 */
